package xyz.wpxy.system.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import xyz.wpxy.entity.R;
import xyz.wpxy.exception.ServiceException;

/**
 * @Description:
 * @author: Peng Wei
 * @date:2023/8/15 17:54
 */
@RestController
public class AuthController {

    @GetMapping("/login")
    public R getToken(@RequestParam String username,
                      @RequestParam(required = false) String password) {

        return R.ok();
    }

    @GetMapping("/wpwp")
    public R getWp() {
        throw new ServiceException("哈哈哈 我是卫鹏");
    }


}
